package com.excel;

import java.util.ArrayList;
import java.util.List;


/**
 * 在表头初始化的过程中，也就决定了列的显示顺序
 * 
 * @author mike
 */
public abstract class MergedColumns {
    /**
     * 用于存储表头的
     */
    List<ExcelColumn> list = new ArrayList<ExcelColumn>();

    protected List<String> allFieldsList = new ArrayList<String>();

    /**
     * 决定显示顺序的字段数组
     */

    /**
     * 合并列   
     * @param formatNames
     *                
     */
    public abstract List<ExcelColumn> mergeColumn();
    protected void addField(ExcelColumn excelColumn) {
	List<String> list = excelColumn.getColumnNames();
	for (int i = 0; i < list.size(); i++) {
	    allFieldsList.add(list.get(i));
	}

    }

    public List<String> getAllFieldsList() {
        return allFieldsList;
    }

    public void setAllFieldsList(List<String> allFieldsList) {
        this.allFieldsList = allFieldsList;
    }
    
    

}
